// ****************** furnace room *******************************

// m here = minute = 60 * second
// h here = hour   = 60 * minute
// K               = 1000
// KK works as 10^6
// s here = second = 1000


// ******** infrastructure *************

Analog.NBits                 =    12   // 8, 10, 12, or 13
Analog.ReadAveraging         =     1   // 1(1)32
Board.BatteryDivider         =     0.0824
Board.LoggingToUSD           =     0
Board.SendingToBase          =     1   // ******** not checked ***********
Board.msBlinkLength          =   200
Board.msMaxInactivity        =    30s
Board.Name                   =   'furnace room'
Board.Nominal3V3             =     3.304  // for fudging analog read
Board.Tag                    =   'F'
DS1307.msJogDelay            =     6s // ******** not checked ***********
FileSystem.NewFileNameQDay   =     1
XBee.BaseID                  =   200
XBee.BaudRate                = 38400

// ********* sensors ******************

ACDetect_1.InUse       =  1 // OK
ACDetect_2.InUse       =  1 // OK
BMP085.InUse           =  0
depth.InUse            =  0
DHT22_1.InUse          =  0
DHT22_2.InUse          =  0
lightning.InUse        =  0 
relay_1.InUse          =  0    
resistance_1.InUse     =  0     // light
resistance_2.InUse     =  0
resistance_3.InUse     =  1     // wind direction OK
SPS30.InUse            =  1     // OK on bench; fails in situ
switch_1.InUse         =  1     // wind speed OK
switch_2.InUse         =  1     // rain OK
VC0706.InUse           =  1
voltage_1.InUse        =  0     
voltage_2.InUse        =  0

ACDetect_2.SensorTag   =  'A'
BMP085.SensorTag       =  'B'
DHT22_2.SensorTag      =  'D'
depth.SensorTag        =  'd'
DHT22_1.SensorTag      =  'E'
ACDetect_1.SensorTag   =  'F'
resistance_1.SensorTag =  'L'
voltage_1.SensorTag    =  'P'
voltage_2.SensorTag    =  'p'
switch_2.SensorTag     =  'R'
SPS30.SensorTag        =  'S'
relay_1.SensorTag      =  'T'
switch_1.SensorTag     =  'W'
resistance_3.SensorTag =  'w'
lightning.SensorTag    =  'Z'

// ---- furnace

ACDetect_1.ACPresentIfBelow          =    0.5
ACDetect_1.Furnace                   =    1
ACDetect_1.Observed                  =  'furnace'
ACDetect_1.usNominalReadInterval     =    6mK
// resistor 4.7K

// ---- A/C

ACDetect_2.AC                        =    1
ACDetect_2.ACPresentIfBelow          =    0.5
ACDetect_2.Observed                  =  'A/C'
ACDetect_2.usNominalReadInterval     =    6mK
// resistor 4.7K

// ---- wind direction

resistance_3.Damping                 =    0.9
resistance_3.Light                   =    0
resistance_3.msNominalReportInterval =    2m
resistance_3.Observed                = 'wind direction'
resistance_3.UpperOhms               =   10K
resistance_3.usNominalReadInterval   =    1mK
resistance_3.WindDirection           =    1

// ----  SPS30

SPS30.AutoCleanDisabled              =    0
SPS30.AutoCleanIntervalHours         =   43
SPS30.AutoCleanImmediately           =    1
SPS30.usNominalReadInterval          =    1hK


// ---- wind speed

// switch_1 modal
switch_1.EventCounter                =    0  // exactly one of these should be true
switch_1.FrequencyCounter            =    1  // .. needed for Wind
switch_1.LogChange                   =    0  // ..
switch_1.LogState                    =    0  // ..

// switch_1 misc
switch_1.msNominalReportInterval     =  10m
switch_1.usMinLowTime                =   1K
switch_1.usNominalReadInterval       =   1mK

// switch_1 event-related
switch_1.ReportCumulativeEvents      =   1
switch_1.ReportNewEvents             =   0
switch_1.Rain                        =   0 // boolean
switch_1.ReportEveryNEvents          =   1 // this is the N, not a boolean
switch_1.ReportEventsByTime          =   0

// switch_1 frequency-related
switch_1.Damping                     =   0.9
switch_1.MaxPlausibleHz              =  60
switch_1.Observed                    =  'wind speed'
switch_1.WindSpeed                   =   1 // boolean
switch_1.WindMPHPerHz                =   1.492

// ---- rain

// switch_2 modal
switch_2.FrequencyCounter            =    0  // exactly one of these should be true
switch_2.EventCounter                =    1  // needed for rain
switch_2.LogChange                   =    0  // ..
switch_2.LogState                    =    0  // ..

// switch_2 misc
switch_2.msNominalReportInterval     =   5m  // almost ignored when reporting every N
switch_2.usMinLowTime                =   1K
switch_2.usNominalReadInterval       =   15sK

// switch_2 event-related
switch_2.ReportCumulativeEvents      =   1
switch_2.ReportNewEvents             =   0
switch_2.Rain                        =   1 // boolean
switch_2.ReportEveryNEvents          =   1 // this is the N, not a boolean
switch_2.ReportEventsByTime          =   0

// switch_2 frequency-related
switch_2.Damping                     =   0.9
switch_2.MaxPlausibleHz              =  60
switch_2.WindSpeed                   =   0 // boolean
switch_2.WindMPHPerHz                =   1.492

// --- VC0706

VC0706.160x240                       =     0
VC0706.320x240                       =     0
VC0706.640x480                       =     1
VC0706.MotionDetect                  =     1 
VC0706.Snapshot                      =     0
VC0706.MaxFileNumber                 =  5999
VC0706.msMinImageInterval            =    30s
VC0706.msNominalReportInterval       =     5m 
VC0706.usNominalReadInterval         =     1sK
